package com.dingxin.ship_together_api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * Author: ctj
 * Date: 2022-08-09
 * Time: 10:55
 */

/**
 * 系统用户表
 */
@ApiModel(value = "系统用户表") @Data @AllArgsConstructor @NoArgsConstructor @TableName(value = "ship_together.sys_user")
public class SysUser implements Serializable {

    @TableId(value = "id", type = IdType.AUTO) @ApiModelProperty(value = "") private Integer id;

    /**
     * 手机号
     */
    @TableField(value = "phone_number")
    @ApiModelProperty(value = "手机号")
    private Long phoneNumber;

    /**
     * openId
     */
    @TableField(value = "open_id")
    @ApiModelProperty(value = "openId")
    private String openId;

    /**
     * 昵称
     */
    @TableField(value = "nickname") @ApiModelProperty(value = "昵称") private String nickname;

    /**
     * 最后登录时间
     */
    @TableField(value = "logged") @ApiModelProperty(value = "最后登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date logged;

    /**
     * 是否删除 0-否 1-是
     */
    @TableField(value = "deleted") @ApiModelProperty(value = "是否删除 0-否 1-是") private Boolean deleted;

    /**
     * 创建人
     */
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PHONE_NUMBER = "phone_number";

    public static final String COL_OPEN_ID = "open_id";

    public static final String COL_NICKNAME = "nickname";

    public static final String COL_LOGGED = "logged";

    public static final String COL_DELETED = "deleted";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";
}